/* 整体容器布局 */
.container {
  width: 100vw;
  height: 100vh;
  padding: 20px;
  background-color: #0a1a2a;
  overflow: hidden;
  font-family: 'Microsoft YaHei', sans-serif;
  color: #ffffff;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: 80px 1fr 1fr;
  gap: 20px;
}

/* 标题栏样式 */
.header {
  grid-column: 1 / 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(16, 46, 82, 0.7);
  border-radius: 5px;
  padding: 0 20px;
  box-shadow: 0 0 15px rgba(0, 195, 255, 0.3);
}

.header-title {
  font-size: 28px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 195, 255, 0.8);
}

.header-time {
  font-size: 20px;
  color: #4fc3ff;
}

/* 面板通用样式 */
.panel {
  background-color: rgba(16, 46, 82, 0.7);
  border-radius: 5px;
  padding: 15px;
  box-shadow: 0 0 15px rgba(0, 195, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00c3ff, transparent);
}

.panel-title {
  font-size: 18px;
  margin-bottom: 15px;
  color: #4fc3ff;
  display: flex;
  align-items: center;
}

.panel-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: linear-gradient(to bottom, #00c3ff, #0088cc);
  margin-right: 8px;
  border-radius: 2px;
}

/* 主地图区域样式 */
.main-map {
  grid-column: 2;
  grid-row: 2 / 5;
  display: flex;
  flex-direction: column;
}

.map-container {
  flex: 1;
  position: relative;
  border-radius: 5px;
  overflow: hidden;
}

.map-tools {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.map-tool-btn {
  padding: 8px 15px;
  background-color: rgba(0, 195, 255, 0.2);
  color: #ffffff;
  border: 1px solid #00c3ff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  backdrop-filter: blur(5px);
}

.map-tool-btn:hover {
  background-color: rgba(0, 195, 255, 0.3);
}

/* 警情列表样式 */
.incident-list {
  grid-column: 1;
  grid-row: 2;
  overflow: scroll;
}

.incident-list .panel-content {
  overflow-y: auto; /* 添加垂直滚动条 */
}

.incident-item {
  background-color: rgba(0, 195, 255, 0.1);
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 3px;
  backdrop-filter: blur(3px);
  border-left: 3px solid #00c3ff;
}

.incident-title {
  font-size: 16px;
  margin-bottom: 5px;
  color: #ffffff;
}

.incident-time {
  font-size: 12px;
  color: #4fc3ff;
  margin-bottom: 8px;
}

.incident-desc {
  font-size: 14px;
  color: #cccccc;
}

/* 警力监控样式 */
.police-force {
  grid-column: 1;
  grid-row: 3;
  overflow: scroll;
}

.police-force .panel-content {
  overflow-y: auto; /* 添加垂直滚动条 */
}

.force-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background-color: rgba(0, 195, 255, 0.1);
  border-radius: 5px;
  backdrop-filter: blur(3px);
}

.force-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(0, 195, 255, 0.2);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 20px;
}

.force-info {
  flex: 1;
}

.force-name {
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 3px;
}

.force-status {
  font-size: 12px;
  color: #4fc3ff;
}

/* 调度控制台样式 */
.dispatch-console {
  grid-column: 1;
  grid-row: 4;
}

.console-messages {
  height: 200px;
  overflow-y: auto;
  margin-bottom: 15px;
  padding-right: 5px;
}

.console-message {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 195, 255, 0.2);
}

.message-time {
  font-size: 12px;
  color: #4fc3ff;
  margin-bottom: 5px;
}

.message-content {
  font-size: 14px;
  color: #ffffff;
  background-color: rgba(0, 195, 255, 0.1);
  padding: 8px 12px;
  border-radius: 3px;
  display: inline-block;
}

.console-input {
  display: none;
}

/* 统计图表样式 */
.statistics {
  grid-column: 3;
  grid-row: 2;
}

.chart-container {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  font-size: 20px;
  background-color: rgba(0, 195, 255, 0.1);
  border-radius: 5px;
}

/* 关键指标样式 */
.key-metrics {
  grid-column: 3;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 15px;
  height: 100%; /* 确保父容器占用所有可用空间 */
}

.metric-card {
  background-color: rgba(0, 195, 255, 0.1);
  border-radius: 5px;
  padding: 15px;
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column; /* 垂直排列内容 */
  justify-content: center; /* 垂直居中 */
  align-items: center; /* 水平居中 */
  text-align: center; /* 文本居中 */
  min-height: 25px; /* 最小高度确保内容不被压缩 */
}

.metric-value {
  font-size: 32px;
  font-weight: bold;
  color: #ffffff;
  margin: 0 0;
}

.metric-title {
  font-size: 14px;
  color: #4fc3ff;
  margin-bottom: 8px;
}

.metric-comparison {
  font-size: 14px;
  margin-top: 8px;
}

.rate-up {
  color: #ff5252;
}

.rate-down {
  color: #00c853;
}

/* 额外调整第3、4个卡片的样式 */
.metric-card:nth-child(2),
.metric-card:nth-child(3) {
  min-height: 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* 系统信息样式 */
.system-info {
  display: none;
}

.scrollable { max-height: 200px; /* 设置最大高度，可根据实际情况调整 */ overflow-y: auto; /* 垂直方向上内容超出最大高度时显示滚动条 */ }
/* 滚动条样式 */
.scrollable::-webkit-scrollbar {
  width: 4px;
}

.scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.scrollable::-webkit-scrollbar-thumb {
  background: #00c3ff;
  border-radius: 2px;
}

/* 为实时警情和警力监控的内容添加滚动条样式 */
.incident-list .panel-content,
.police-force .panel-content {
  -webkit-overflow-scrolling: touch;
}

.incident-list .panel-content::-webkit-scrollbar,
.police-force .panel-content::-webkit-scrollbar {
  width: 4px;
}

.incident-list .panel-content::-webkit-scrollbar-track,
.police-force .panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.incident-list .panel-content::-webkit-scrollbar-thumb,
.police-force .panel-content::-webkit-scrollbar-thumb {
  background: #00c3ff;
  border-radius: 2px;
}
